﻿<UserControl
    x:Class="JV.Com.Views.Wrapper.DetailNewsWrapper"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:internals="using:JV.Com.Internals"
    mc:Ignorable="d" x:Name="pageRoot"
    xmlns:converters="using:JV.Com.Converters">

    <UserControl.Resources>
        <converters:HTMLInlineCollectionToParagraphConverter x:Key="HTMLConverter" />
    </UserControl.Resources>
    
    <Grid>
        <ProgressRing HorizontalAlignment="Center" VerticalAlignment="Center" IsActive="{Binding InLoading}"
                                      Height="50" Width="50" Foreground="{StaticResource DataItemBorderThemeBrush}" />
        <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"
                              ZoomMode="Disabled" HorizontalScrollMode="Disabled"
                              Visibility="{Binding InLoading, Converter={StaticResource IB2VConverter}}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="8*" MaxWidth="1000" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Vertical" Margin="20, 12, 20, 40">
                    <TextBlock Text="{Binding Title}" Style="{StaticResource BigTitleItemTextBlockStyle}" />
                    <TextBlock Text="{Binding FormatedDate}" Style="{StaticResource SummaryItemTextBlockStyle}" />
                    <RichTextBlock x:Name="newsBlock" HorizontalAlignment="Left" internals:RichTextBlockExtension.Paragraph="{Binding Paragraph}"
                                            Style="{StaticResource RichTextBlockDefaultStyle}" Margin="0, 20, 0, 0" />
                </StackPanel>

            </Grid>
        </ScrollViewer>
    </Grid>
</UserControl>